<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>jsnotepad</title>
  <link rel="stylesheet" href="./css/norms.css">
  <link rel="stylesheet" href="./css/statusbar.css">
  <link rel="stylesheet" href="./css/dlg-common.css">
  <link rel="stylesheet" href="./css/dlg-about.css">
  <link rel="stylesheet" href="./css/menubar.css">
  <link rel="stylesheet" href="./css/editor.css">
  <link rel="stylesheet" href="./css/list.css">
  <link rel="stylesheet" href="./css/dlg-font.css">
</head>
<body>

<script src="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="./js/app.js"></script>
<script src="./js/menu.js"></script>
<script src="./js/dlg-about.js"></script>
<script src="./js/menubar.js"></script>
<script src="./js/editor.js"></script>
<script src="./js/statusbar.js"></script>
<script src="./js/list.js"></script>
<script src="./js/dlg-font.js"></script>
<script>
  $(function() {
    $statusBar.init();
    $statusBar.display(false);
    $menubar.enabled(4, 0, false);
    $menubar.enabled(1, 0, true);
    
    $editor.show();
    
    var bVisable = true;
    $statusBar.init({row: 300, col: 100});

    var $btnTest = $('#btn-test');

    $btnTest.click(function() {
      bVisable = !bVisable;
      $statusBar.display(bVisable);

      var title = bVisable ? '隐藏状态栏' : '显示状态栏';
      $btnTest.val(title);
    });

    var $btnSetRC = $('#set-rc');

    $btnSetRC.click(function() {
      $statusBar.setRowCol($('#row').val(), $('#col').val());
    });
    
    $btnTest = $('div.test>input[type="button"]');

    $btnTest.click(function() {
      $dlgFont.show({
        okHandler: function(e) {
          console.log(e);
        }
      });
    });
  });
</script>
</body>
</html>
